/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

/**
 * <p>Project: jse2303 - For4
 * <p>Powered by webrx On 2023-07-11 15:30:38
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For11 {
    public static void main(String[] args) {
        for (int a = 0; a <= 100 / 5; a++) {
            for (int b = 0; b <= 100 / 3; b++) {
                for (int c = 0; c <= 100; c++) {
                    if (c % 3 != 0) continue;
                    int s1 = a + b + c;
                    int s2 = a * 5 + b * 3 + c / 3;
                    if (s1 == 100 && s2 == 100) {
                        System.out.printf("公鸡：%d只，母鸡：%d只，小鸡：%d只!%n", a, b, c);
                    }
                }
            }
        }
    }
}
